package com.gs.SynAntiWandering.adapter;

import android.content.Context;

import com.gs.SynAntiWandering.R;
import com.gs.SynAntiWandering.adapter.base.BaseAdapter;
import com.gs.SynAntiWandering.adapter.base.BaseViewHolder;
import com.gs.SynAntiWandering.db.dto.TagDto;

import java.util.List;

public class TagAdapter extends BaseAdapter<TagDto> {
    public TagAdapter(Context context, List<TagDto> mData, int layoutId) {
        super(context, mData, layoutId);
    }

    @Override
    public void convert(BaseViewHolder holder, TagDto item, int position) {
        holder.setText(R.id.tv_tag, item.getTagNum());
        holder.setOnClickListener(R.id.iv_delete, v -> {
            if (onItemChildrenClickListener != null) {
                onItemChildrenClickListener.onItemChildrenClickListener(v, position);
            }
        });
    }
}
